﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<jotadomain_MVC2.Models.Book>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

   <h2>Index</h2>
    <table>
        <tr>
            <th></th>
            <th> id  </th>
            <th> nome </th>
            <th> email </th>
            <th> idade </th>
        </tr>
    <% foreach (var item in Model) { %>
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.id }) %> |
                <%: Html.ActionLink("Details", "Details", new { id=item.id })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.id })%>
            </td>
            <td> <%: item.BookId %> </td>
            <td> <%: item.Name %> </td>
            <td> <%: item.Type %> </td>
            <td> <%: item.Completed %> </td>
        </tr>
    <% } %>
    </table>
    <p> <%: Html.ActionLink("Create New", "Create") %> </p>

</asp:Content>
